﻿using Qianke.Core.Common.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;

namespace Qianke.Core.Saas.Application.Common
{
    public static class RepositoryExtensions
    {
        public static async Task DeleteFromOrganId<TEntity,TKey>(this IRepository<TEntity, TKey> repository,long organId)
            where TEntity : class,IHasOrganId, IEntity<TKey>
        {
            await repository.DeleteAsync(u=>u.OrganId == organId);
        }
    }
}
